Don't error out if top level configs do not exist#86
Don't error out if top level configs do not exist#86stlaz wants to merge 1 commit intoopenshift:masterfrom
Conversation
When either or both the OAuth and Authentication objects is not found, don't fail and assume the defaults.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: stlaz The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold Let me update #65 so the approach I want to take here will become more clear. |
| return nil, err | ||
| } | ||
| // did not find the object, use default | ||
| auth = defaultAuthenticationConfig() |
There was a problem hiding this comment.
I think you need to create the default object (before attempting to update it's status 🙂 )
| return nil, nil, nil, err | ||
| } | ||
| // did not find the object, use default | ||
| oauthConfig = defaultOAuthConfig() |
| }, | ||
| Spec: configv1.OAuthSpec{ | ||
| TokenConfig: configv1.TokenConfig{ | ||
| AccessTokenMaxAgeSeconds: 86400, |
There was a problem hiding this comment.
nit: make a const, add comment about how long this is.
|
@stlaz: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When either or both the OAuth and Authentication objects is not found,
don't fail and assume the defaults.
The operator's config itself is handled in #65